<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      position: relative;
      display: flex;
      width: 300px;
      height: 300px;
      background-color: orange;
    }

    /* .container .box {
      height: 200px;
      background-color: #f00;

      box-sizing: border-box;
      border-right: 30px solid #0f0;
      padding-right: 30px;
    } */

    /* .container .box2 {
      position: absolute;
      width: 100px;
      height: 100px;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      margin: auto;
      background-color: #f00;

      box-sizing: border-box;
      border: 10px solid #0f0;
    } */

    .container .box3 {
      width: 100px;
      background-color: #f00;
      border-top: 30px solid #0f0;
      box-sizing: border-box;
    }

    .container .box4 {
      flex: 1; /* flex: 1 -> flex-grow: 1 */
      background-color: purple;
      border: 30px solid skyblue;
    }
  </style>
</head>
<body>
  
  <!-- 1.块级盒子的嵌套 -->
  <!-- <div class="container">
    <div class="box">fdasfdasfda我是coderwhy, 哈哈哈哈,呵呵呵呵呵呵</div>
  </div> -->


  <!-- 2.定位的案例 -->
  <!-- <div class="container">
    <div class="box2"></div>
  </div> -->

  
  <!-- 3.flex布局 -->
  <div class="container">
    <div class="box3"></div>
    <div class="box4"></div>
  </div>

</body>
</html>